package cn.itcast.AOP;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component
@Aspect
@ComponentScan
public class Aop {
     //@Before("target(cn.itcast.event.EventConfig)")
     public void testaop() {
        System.out.println("AOPing.........");
    }

    //@Before("within(cn.itcast.event.*)")
    public void testaop1() {
        System.out.println("-------------AOPing......");
    }

    //@Before("execution(public * *(..))")
    public void testaop3() {
        System.out.println("--------++AOPing++....");
    }

    @Before("@annotation(cn.itcast.Ye)")
    public void testaop4() {
        System.out.println("-------------AOPing......");
    }
}
